package com.csist.pojo.excel;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.csist.pojo.bo.BasicStudentInfoBo;
import com.csist.pojo.bo.LevelRegistrationBo;
import com.csist.pojo.po.basicInfoModule.*;
import com.csist.pojo.po.logModule.SystemOperationLogs;
import com.csist.service.bo.SpecificationClassInfoBoService;
import com.csist.service.po.basicInfoModule.*;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;
import java.util.List;

/**
 * @ClassName CompleteData
 * @Description 【自行描述】
 * @Author Yingru Yu
 * @Date 2024/6/13 16:39
 * @Version 1.0
 */

//lombok的注解可以自动生成一些代码
//     data注解包含： getter/setter/toString/equalsAndHashCode
@Data
@NoArgsConstructor
@ExcelIgnoreUnannotated
public class CompleteData {
    // 一级表头：基础信息
    /**
     * 序号（excel表序号）
     */
    @ExcelProperty(value = {"基础信息", "序号"})
    private String id;

    // 学生基本信息
    /**
     * 专修编号
     */
    @ExcelProperty(value = {"基础信息", "专修编号"})
    private String studentId;
    /**
     * 学生姓名
     */
    @ExcelProperty(value = {"基础信息", "学生姓名"})
    private String name;
    /**
     * 学生性别
     */
    @ExcelProperty(value = {"基础信息", "性别"})
    private String gender;
    /**
     * 教务证件号(身份证号)
     */
    @ExcelProperty(value = {"基础信息", "教务证件号"})
    private String credential;
    /**
     * 层次(教学背景)
     */
    @ExcelProperty(value = {"基础信息", "层次"})
    private String educationBackground;
    /**
     * 学习类型（在校状态）
     */
    @ExcelProperty(value = {"基础信息", "学习类型"})
    private String studentEducationState;
    /**
     * 专修年级
     */
    @ExcelProperty(value = {"基础信息", "专修年级"})
    private String studentYear;
    /**
     * 报道春秋季
     */
    @ExcelProperty(value = {"基础信息", "报道春秋季"})
    private String studentSeason;
    /**
     * 专修学籍专业
     */
    @ExcelProperty(value = {"基础信息", "专修学籍专业"})
    private String studentSpecificationMajor;
    /**
     * 分班(班号)
     */
    @ExcelProperty(value = {"基础信息", "分班"})
    private String studentClass;
    /**
     * 班主任
     */
    @ExcelProperty(value = {"基础信息", "班主任"})
    private String studentClassAdvisor;


    // 变更板块

    /**
     * 变更类别
     */
    @ExcelProperty(value = {"基础信息", "变更类别"})
    private String changeCategory;
    /**
     * 变更理由
     */
    @ExcelProperty(value = {"基础信息", "变更理由"})
    private String changeReason;
    /**
     * 备注1
     */
    @ExcelProperty(value = {"基础信息", "备注1"})
    private String note1;
    /**
     * 学历组合
     */
    @ExcelProperty(value = {"基础信息", "学历组合"})
    private String educationMethodCombination;

    // 一级表头：本科学历信息
    // 本科学历信息
    /**
     * 科大平台注册号
     */
    @ExcelProperty(value = {"本科学历信息", "科大平台注册号"})
    private String bachelorId;
    /**
     * 统一学号(准考证号)
     */
    @ExcelProperty(value = {"本科学历信息", "统一学号"})
    private String bachelorAdmissionId;
    /**
     * 本科学历类型（教学方式代码）
     */
    @ExcelProperty(value = {"本科学历信息", "本科学历类型"})
    private String bachelorEducationMethod;
    /**
     * 学历专业（本科专业）
     */
    @ExcelProperty(value = {"本科学历信息", "学历专业"})
    private String bachelorMajor;
    /**
     * 本科注册时间(年+季)
     */
    @ExcelProperty(value = {"本科学历信息", "本科注册时间"})
    private String bachelorRegistryTime;
    /**
     * 本科学历状态（在校状态）
     */
    @ExcelProperty(value = {"本科学历信息", "本科学历状态"})
    private String bachelorEducationState;
    /**
     * 本科毕业证编号
     */
    @ExcelProperty(value = {"本科学历信息", "本科毕业证编号"})
    private String bachelorGraduationId;
    /**
     * 本科毕业时间
     */
    @ExcelProperty(value = {"本科学历信息", "本科毕业时间"})
    private String bachelorGraduationTime;


    // 一级表头：专科学历信息
    // 专科学历信息
    /**
     * 专科科大平台注册号
     */
    @ExcelProperty(value = {"专科学历信息", "科大平台注册号"})
    private String trainingId;
    /**
     * 统一学号(准考证号)
     */
    @ExcelProperty(value = {"专科学历信息", "专科学号(专科准考证号）"})
    private String trainingAdmissionId;
    /**
     * 专科学历类型（教学方式代码）
     */
    @ExcelProperty(value = {"专科学历信息", "专科学历类型"})
    private String trainingEducationMethod;
    /**
     * 学历专业（专科专业）
     */
    @ExcelProperty(value = {"专科学历信息", "专科专业"})
    private String trainingMajor;
    /**
     * 专科注册时间(年+季)
     */
    @ExcelProperty(value = {"专科学历信息", "专科注册时间"})
    private String trainingRegistryTime;
    /**
     * 专科学历状态（在校状态）
     */
    @ExcelProperty(value = {"专科学历信息", "专科学历状态"})
    private String trainingEducationState;
    /**
     * 专科毕业证编号
     */
    @ExcelProperty(value = {"专科学历信息", "专科毕业证编号"})
    private String trainingGraduationId;
    /**
     * 专科毕业时间
     */
    @ExcelProperty(value = {"专科学历信息", "专科毕业时间"})
    private String trainingGraduationTime;

    /**
     * 备注2
     */
    @ExcelProperty(value = {"", "备注2"})
    private String note2;

    /**
     * 备注3
     */
    @ExcelProperty(value = {"", "备注3"})
    private String note3;

    public CompleteData(String id, String studentId, String name, String gender, String credential, String educationBackground, String studentEducationState, String studentYear, String studentSeason, String studentSpecificationMajor, String studentClass, String studentClassAdvisor, String changeCategory, String changeReason, String note1, String educationMethodCombination, String bachelorId, String bachelorAdmissionId, String bachelorEducationMethod, String bachelorMajor, String bachelorRegistryTime, String bachelorEducationState, String bachelorGraduationId, String bachelorGraduationTime, String trainingId, String trainingAdmissionId, String trainingEducationMethod, String trainingMajor, String trainingRegistryTime, String trainingEducationState, String trainingGraduationId, String trainingGraduationTime, String note2, String note3) {
        this.id = id;
        this.studentId = studentId;
        this.name = name;
        this.gender = gender;
        this.credential = credential;
        this.educationBackground = educationBackground;
        this.studentEducationState = studentEducationState;
        this.studentYear = studentYear;
        this.studentSeason = studentSeason;
        this.studentSpecificationMajor = studentSpecificationMajor;
        this.studentClass = studentClass;
        this.studentClassAdvisor = studentClassAdvisor;
        this.changeCategory = changeCategory;
        this.changeReason = changeReason;
        this.note1 = note1;
        this.educationMethodCombination = educationMethodCombination;
        this.bachelorId = bachelorId;
        this.bachelorAdmissionId = bachelorAdmissionId;
        this.bachelorEducationMethod = bachelorEducationMethod;
        this.bachelorMajor = bachelorMajor;
        this.bachelorRegistryTime = bachelorRegistryTime;
        this.bachelorEducationState = bachelorEducationState;
        this.bachelorGraduationId = bachelorGraduationId;
        this.bachelorGraduationTime = bachelorGraduationTime;
        this.trainingId = trainingId;
        this.trainingAdmissionId = trainingAdmissionId;
        this.trainingEducationMethod = trainingEducationMethod;
        this.trainingMajor = trainingMajor;
        this.trainingRegistryTime = trainingRegistryTime;
        this.trainingEducationState = trainingEducationState;
        this.trainingGraduationId = trainingGraduationId;
        this.trainingGraduationTime = trainingGraduationTime;
        this.note2 = note2;
        this.note3 = note3;
    }

    public void clear() {
        this.id = null;
        this.studentId = null;
        this.name = null;
        this.gender = null;
        this.credential = null;
        this.educationBackground = null;
        this.studentEducationState = null;
        this.studentYear = null;
        this.studentSeason = null;
        this.studentSpecificationMajor = null;
        this.studentClass = null;
        this.studentClassAdvisor = null;
        this.changeCategory = null;
        this.changeReason = null;
        this.note1 = null;
        this.educationMethodCombination = null;
        this.bachelorId = null;
        this.bachelorAdmissionId = null;
        this.bachelorEducationMethod = null;
        this.bachelorMajor = null;
        this.bachelorRegistryTime = null;
        this.bachelorEducationState = null;
        this.bachelorGraduationId = null;
        this.bachelorGraduationTime = null;
        this.trainingId = null;
        this.trainingAdmissionId = null;
        this.trainingEducationMethod = null;
        this.trainingMajor = null;
        this.trainingRegistryTime = null;
        this.trainingEducationState = null;
        this.trainingGraduationId = null;
        this.trainingGraduationTime = null;
        this.note2 = null;
        this.note3 = null;
    }

    // 以下为数据库对映对象及对应操作
    BasicStudentInfoBo bsi = null;
    SystemOperationLogs sol = null;


    public void constructInfoObjects(EducationBackgroundService ebs, EducationStatusService ess,
                                     SpecificationMajorInfoService smis, SpecificationClassInfoBoService scibs,
                                     EducationMethodService ems, LevelMajorInfoService lmis) {
        bsi = new BasicStudentInfoBo();

        //本科学历信息
        // 编号
        if (id != null && id.matches("^[1-9]\\d*$")) {
            bsi.setBsiId(Integer.parseInt(id));
        } else {
            bsi = null;
            // throw new ExcelConstructException("学生ID不能为空");
        }
        // 专修编号
        if (studentId != null && studentId.matches("^[1-9]\\d[3,9][0-9][A-Za-z]\\d{3}$")) {
            bsi.setBsiSid(studentId);
        }
        // 姓名
        if (name != null && !name.isEmpty()) {
            bsi.setBsiName(name);
        }
        // 性别
        if (gender != null && gender.matches("^男|女$")) {
            bsi.setBsiGender("男".equals(gender) ? 0 : 1);
        }
        // 证件号
        if (credential != null && !credential.isEmpty()) {
            bsi.setBsiCredential(credential);
        }
        // 层次(教学背景)
        if (educationBackground != null && !educationBackground.isEmpty()) {
            List<EducationBackground> ebl = ebs.findEducationBackground(new EducationBackground(0,
                    educationBackground, null, null));
            if (ebl != null && !ebl.isEmpty()) {
                bsi.setEducationBackground(ebl.get(0));
            }
            // 需要通过名字查询学历背景层次的方法
        }
        // 学习类型(在校状态)
        if (studentEducationState != null && !studentEducationState.isEmpty()) {
            List<EducationStatus> esl = ess.findEducationStatus(new EducationStatus(0, studentEducationState
                    , null, null));
            if (esl != null && !esl.isEmpty()) {
                bsi.setEducationStatus(esl.get(0));
            }
            // 需要通过名字查询在校状态的方法
        }
        // 专修年级
        if (studentYear != null && studentYear.matches("^[1-9]\\d{3}$")) {
            bsi.setBsiYear(LocalDateTime.of(Integer.parseInt(studentYear), 1, 1, 0, 0));
            // 报道春秋季
            if (studentSeason != null && !studentSeason.matches("^春|秋$")) {
                bsi.setBsiSeason("春".equals(studentSeason) ? 3 : 9);
            }
        }
        //专修学籍专业
        if (studentSpecificationMajor != null && !studentSpecificationMajor.isEmpty()) {
            List<SpecificationMajorInfo> smil = smis.findSpecificationMajorInfo(new SpecificationMajorInfo(0,
                    studentSpecificationMajor, null, null, null));
            if (smil != null && !smil.isEmpty()) {
                bsi.setSpecificationMajorInfo(smil.get(0));
            }
        }
        //分班(班号)与班主任
        //由于班级没有组合查询语句，无法完成
        // if (studentClass != null && studentClass.matches("^[1-9]\\d*$")) {
        //     SpecificationClassInfoBo scib = null;
        //      待完成的查询语句放在这里并赋值给scib
        //     if (scib != null) {
        //         bsi.setSpecificationClassInfoBo(scib);
        //         //检查班主任和班级信息是否一致或者班主任信息为空，否则直接去掉班级信息
        //         if (!(studentClassAdvisor != null && !this.getStudentClassAdvisor().isEmpty() && this.getStudentClassAdvisor().equals(bsi.getSpecificationClassInfoBo().getUserInfoBo().getUiName()))) {
        //             bsi = null;
        //             throw new ExcelConstructException("班级信息与班主任信息不匹配");
        //         }
        //     }
        // }
        // if (studentClassAdvisor != null && !studentClassAdvisor.isEmpty() && bsi.getSpecificationClassInfoBo() == null) {
        //     bsi = null;
        //     throw new ExcelConstructException("班主任信息与班主任信息不匹配");
        // }


        //变更板块
        //日志未完成，待完善

        //学历组合省略

        //本科学历信息
        LevelRegistrationBo bachelorLrb = new LevelRegistrationBo();
        bachelorLrb.setLrBsiId(bsi.getBsiId());
        bachelorLrb.setLrIsBachelor(true);
        bachelorLrb.setLrIsOurSpecilization(true);

        //科大平台注册号
        if (bachelorId != null && !bachelorId.isEmpty()) {
            bachelorLrb.setLrUestcId(bachelorId);
        }
        //准考证号(学号)
        if (bachelorAdmissionId != null && !bachelorAdmissionId.isEmpty()) {
            bachelorLrb.setLrLevelAdmissionId(bachelorAdmissionId);
        }
        //本科学历类型
        if (bachelorEducationMethod != null && !bachelorEducationMethod.isEmpty()) {
            List<EducationMethod> eml = ems.findEducationMethod(new EducationMethod(null, null, bachelorEducationMethod,
                    null,
                    null));
            if (eml != null && !eml.isEmpty()) {
                bachelorLrb.setEducationMethod(eml.get(0));
            }
        }
        //本科专业
        if (bachelorMajor != null && !bachelorMajor.isEmpty()) {
            List<LevelMajorInfo> lmil = lmis.findLevelMajorInfo(new LevelMajorInfo(null, bachelorMajor, null, null, null));
            if (lmil != null && !lmil.isEmpty()) {
                bachelorLrb.setLevelMajorInfo(lmil.get(0));
            }
        }

        //本科注册时间
        if (bachelorRegistryTime != null && bachelorRegistryTime.matches("^[1-9]\\d{3}[春|秋]$")) {
            bachelorLrb.setLrLevelRegYear(LocalDateTime.of(Integer.parseInt(bachelorRegistryTime.substring(0, 4)),
                    bachelorRegistryTime.substring(4).equals("春") ? 3 : 9
                    , 1, 0, 0));
            bachelorLrb.setLrLevelRegSeasion(bachelorRegistryTime.substring(4).equals("春") ? 3 : 9);
        }

        //本科学历状态(在校状态)
        if (bachelorEducationState != null && !bachelorEducationState.isEmpty()) {
            List<EducationStatus> esl = ess.findEducationStatus(new EducationStatus(null, bachelorEducationState,
                    null, null));
            if (esl != null && !esl.isEmpty()) {
                bachelorLrb.setEducationStatus(esl.get(0));
            }
        }

        //本科毕业证号
        if (bachelorGraduationId != null && !bachelorGraduationId.isEmpty()) {
            bachelorLrb.setLrLevelGraduId(bachelorGraduationId);
        }

        //本科毕业时间
        if (bachelorGraduationTime != null && bachelorGraduationTime.matches("^[1-9]\\d{3}")) {
            bachelorLrb.setLrLevelGraduYear(LocalDateTime.of(Integer.parseInt(bachelorGraduationTime.substring(0, 4)),
                    1, 1, 0, 0));
        }

        bsi.setUndergraduateLevelRegistrationBo(bachelorLrb);


        //专科学历信息
        LevelRegistrationBo trainingLrb = new LevelRegistrationBo();
        trainingLrb.setLrBsiId(bsi.getBsiId());
        trainingLrb.setLrIsBachelor(false);
        trainingLrb.setLrIsOurSpecilization(true);

        //科大平台注册号
        if (trainingId != null && !trainingId.isEmpty()) {
            trainingLrb.setLrUestcId(trainingId);
        }
        //准考证号(学号)
        if (trainingAdmissionId != null && !trainingAdmissionId.isEmpty()) {
            trainingLrb.setLrLevelAdmissionId(trainingAdmissionId);
        }
        //本科学历类型
        if (trainingEducationMethod != null && !trainingEducationMethod.isEmpty()) {
            List<EducationMethod> eml = ems.findEducationMethod(new EducationMethod(null, null, trainingEducationMethod,
                    null,
                    null));
            if (eml != null && !eml.isEmpty()) {
                trainingLrb.setEducationMethod(eml.get(0));
            }
        }
        //本科专业
        if (trainingMajor != null && !trainingMajor.isEmpty()) {
            List<LevelMajorInfo> lmil = lmis.findLevelMajorInfo(new LevelMajorInfo(null, trainingMajor, null, null, null));
            if (lmil != null && !lmil.isEmpty()) {
                trainingLrb.setLevelMajorInfo(lmil.get(0));
            }
        }

        //本科注册时间
        if (trainingRegistryTime != null && trainingRegistryTime.matches("^[1-9]\\d{3}[春|秋]$")) {
            trainingLrb.setLrLevelRegYear(LocalDateTime.of(Integer.parseInt(trainingRegistryTime.substring(0, 4)),
                    trainingRegistryTime.substring(4).equals("春") ? 3 : 9
                    , 1, 0, 0));
            trainingLrb.setLrLevelRegSeasion(trainingRegistryTime.substring(4).equals("春") ? 3 : 9);
        }

        //本科学历状态(在校状态)
        if (trainingEducationState != null && !trainingEducationState.isEmpty()) {
            List<EducationStatus> esl = ess.findEducationStatus(new EducationStatus(null, trainingEducationState,
                    null, null));
            if (esl != null && !esl.isEmpty()) {
                trainingLrb.setEducationStatus(esl.get(0));
            }
        }

        //本科毕业证号
        if (trainingGraduationId != null && !trainingGraduationId.isEmpty()) {
            trainingLrb.setLrLevelGraduId(trainingGraduationId);
        }

        //本科毕业时间
        if (trainingGraduationTime != null && trainingGraduationTime.matches("^[1-9]\\d{3}")) {
            trainingLrb.setLrLevelGraduYear(LocalDateTime.of(Integer.parseInt(trainingGraduationTime.substring(0, 4)),
                    1, 1, 0, 0));
        }

        bsi.setSpecialtyLevelRegistrationBo(trainingLrb);
    }

    public void decomposeInfoObjects(BasicStudentInfoBo bsi, SystemOperationLogs sol) {
        this.decomposeInfoObjects(bsi, sol, 1);
    }

    public void decomposeInfoObjects(BasicStudentInfoBo bsi, SystemOperationLogs sol, Integer id) {
        this.bsi = bsi;
        //序号
        this.id = id.toString();
        //基本学生信息

        //专修编号
        this.studentId = bsi.getBsiSid();

        //学生姓名
        this.name = bsi.getBsiName();

        //学生性别
        this.gender = bsi.getBsiGender() == 0 ? "男" : "女";

        //教务证件号(身份证号)
        this.credential = bsi.getBsiCredential();

        //层次(教学背景)
        if (bsi.getEducationBackground() != null) {
            this.educationBackground = bsi.getEducationBackground().getEbName();
        }

        //学习类型(在校状态)
        if (bsi.getEducationStatus() != null) {
            this.studentEducationState = bsi.getEducationStatus().getEsName();
        }

        //专修年级
        if (bsi.getBsiYear() != null) {
            this.studentYear = bsi.getBsiYear().getYear() + "";
        }

        //报道春秋季
        if (bsi.getBsiSeason() == 3) {
            this.studentSeason = "春";
        }
        if (bsi.getBsiSeason() == 9) {
            this.studentSeason = "秋";
        }

        //专修学籍专业
        if (bsi.getSpecificationMajorInfo() != null) {
            this.studentSpecificationMajor = bsi.getSpecificationMajorInfo().getSmiName();
        }

        //分班(班号)与班主任
        if (bsi.getSpecificationClassInfoBo() != null) {
            this.studentClass = bsi.getSpecificationClassInfoBo().getSciMCId().toString();
            if (bsi.getSpecificationClassInfoBo().getUserInfoBo() != null) {
                this.studentClassAdvisor = bsi.getSpecificationClassInfoBo().getUserInfoBo().getUiName();
            }
        }

        //变更板块
        //由于没有日志及异动对象，用po中的日志对象替代
        if(sol != null){
            if (sol.getSolSpecialMarker()) {
                //变更类别
                if (sol.getSolSpecialType() != null) {
                    this.changeCategory = sol.getSolSpecialType();
                }
                //变更理由
                if (sol.getSolSpecialReason() != null) {
                    this.changeReason = sol.getSolSpecialReason();
                }
            }
        }


        //备注1 基础信息备注
        this.note1 = bsi.getBsiNotes();

        String str = null;
        LevelRegistrationBo bachelorLrb = bsi.getUndergraduateLevelRegistrationBo();
        LevelRegistrationBo trainingLrb = bsi.getSpecialtyLevelRegistrationBo();
        //学历组合
        if (bachelorLrb != null && bachelorLrb.getEducationMethod() != null && trainingLrb != null && trainingLrb.getEducationMethod() != null) {
            str = bachelorLrb.getEducationMethod().getEmCode() + "+" + trainingLrb.getEducationMethod().getEmCode();
        } else if (bachelorLrb != null && bachelorLrb.getEducationMethod() != null) {
            str = bachelorLrb.getEducationMethod().getEmCode();
        } else if (trainingLrb != null && trainingLrb.getEducationMethod() != null) {
            str = trainingLrb.getEducationMethod().getEmCode();
        }
        if (str != null) {
            this.educationMethodCombination = str;
        }

        //本科学历信息
        if (bachelorLrb != null) {
            //科大平台注册号
            this.bachelorId = bachelorLrb.getLrUestcId();
            //统一学号
            this.bachelorAdmissionId = bachelorLrb.getLrLevelAdmissionId();
            //本科学历类型
            if (bachelorLrb.getEducationMethod() != null) {
                this.bachelorEducationMethod = bachelorLrb.getEducationMethod().getEmCode();
            }
            //本科学历专业
            if (bachelorLrb.getLevelMajorInfo() != null) {
                this.bachelorMajor = bachelorLrb.getLevelMajorInfo().getLmiName();
            }
            //本科注册时间(年+季)
            if (bachelorLrb.getLrLevelRegYear() != null && bachelorLrb.getLrLevelRegSeasion() != null) {
                this.bachelorRegistryTime =
                        bachelorLrb.getLrLevelRegYear().getYear() + bachelorLrb.getLrLevelRegSeasion() == 3 ? "春" : "秋";
            }
            //本科学历状态(在校状态)
            if (bachelorLrb.getEducationStatus() != null) {
                this.bachelorEducationState = bachelorLrb.getEducationStatus().getEsName();
            }
            //本科毕业证编号
            this.bachelorGraduationId = bachelorLrb.getLrLevelGraduId();
            //本科毕业时间
            if (bachelorLrb.getLrLevelGraduYear() != null && bachelorLrb.getLrLevelGraduSeason() != null) {
                this.bachelorGraduationTime =
                        bachelorLrb.getLrLevelGraduYear().getYear() + bachelorLrb.getLrLevelGraduSeason() == 3 ? "春" : "秋";
            }

            //备注2 本科信息备注
            this.note2 = bachelorLrb.getLrLevelNotes();
        }

        //专科学历信息
        if (trainingLrb != null) {
            //科大平台注册号
            this.trainingId = trainingLrb.getLrUestcId();
            //统一学号
            this.trainingAdmissionId = trainingLrb.getLrLevelAdmissionId();
            //专科学历类型
            if (trainingLrb.getEducationMethod() != null) {
                this.trainingEducationMethod = trainingLrb.getEducationMethod().getEmCode();
            }
            //专科学历专业
            if (trainingLrb.getLevelMajorInfo() != null) {
                this.trainingMajor = trainingLrb.getLevelMajorInfo().getLmiName();
            }
            //专科注册时间(年+季)
            if (trainingLrb.getLrLevelRegYear() != null && trainingLrb.getLrLevelRegSeasion() != null) {
                this.trainingRegistryTime =
                        trainingLrb.getLrLevelRegYear().getYear() + trainingLrb.getLrLevelRegSeasion() == 3 ? "春" : "秋";
            }
            //专科学历状态(在校状态)
            if (trainingLrb.getEducationStatus() != null) {
                this.trainingEducationState = trainingLrb.getEducationStatus().getEsName();
            }
            //专科毕业证编号
            this.trainingGraduationId = trainingLrb.getLrLevelGraduId();
            //专科毕业时间
            if (trainingLrb.getLrLevelGraduYear() != null && trainingLrb.getLrLevelGraduSeason() != null) {
                this.trainingGraduationTime =
                        trainingLrb.getLrLevelGraduYear().getYear() + trainingLrb.getLrLevelGraduSeason() == 3 ? "春" : "秋";
            }

            //备注3 专科信息备注
            this.note3 = trainingLrb.getLrLevelNotes();
        }


    }

}

